
/**
 * 测试 ==> + 999
 * @param {number} num
 */


export function formatNum(num) {
  num = num + ''
  if (num.length < 4) {
    return num
  }
  var intPartFormat = num.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); //将整数部分逢三一断
  return intPartFormat
}

